﻿using LiteBlog.Repositories.Common;
using LiteBlog.Repositories.Contracts;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace LiteBlog.Repositories.Framework
{
    public class DataAccess : IXmlDataAccess
    {
        protected IXmlHelper _xmlHelper;
        protected IDataContext _context;

        public DataAccess(IDataContext context, IXmlHelper xmlHelper)
        {
            _context = context;
            _xmlHelper = xmlHelper;
            _idName = Attr.Id;
        }

        public IXmlHelper XmlHelper
        {
            get { return _xmlHelper; }
        }

        public IDataContext DataContext
        {
            get
            {
                return _context;
            }
        }

        protected string _path;
        public string Path
        {
            get { return _path; }
        }

        protected string _idName;
        public string IdName
        {
            get { return _idName;  }
        }

        protected string _elementName;
        public string ElementName
        {
            get { return _elementName; }
        }
    }
}
